Ext.ns('Tm.fusionchart');
Tm.fusionchart.ChartIndexPanel = Ext.extend(Ext.Panel, {
			frame : true,
			autoWidth : true,
			// autoHeight : true,
			layout : 'fit',
			html : '<div id="chartContainer">FusionCharts XT will load here!</div>',
			initComponent : function() {
				Tm.fusionchart.ChartIndexPanel.superclass.initComponent.call(this);
			},
			listeners : {
				afterrender : function() {
					Ext.Ajax.request({
								url : 'fusionchart/single_chartData.do',
//								
//								params : {
//					// id : dataId
//								},
								success : function(response, action) {
									var xml = response.responseText;
 									//var chart = new FusionCharts("web/lib/fusionchart/charts/FCF_Column3D.swf","single_column3d", "600", "450", "0", "1");
									FusionCharts.setCurrentRenderer('javascript');
								      var myChart = new FusionCharts("web/lib/fusionchart/Charts/Column3D.swf", 
								              "myChartId", "400", "300", "0", "1");

								      myChart.setJSONData( { 
								          "chart": 
								          { 
								                  "caption" : "Weekly Sales Summary" ,    
								                  "xAxisName" : "Week", 
								                  "yAxisName" : "Sales",  
								                  "numberPrefix" : "$" 
								          },

								          "data" : 
								          [ 
								                  { "label" : "Week 1", "value" : "14400" },
								                  { "label" : "Week 2", "value" : "19600" }, 
								                  { "label" : "Week 3", "value" : "24000" }, 
								                  { "label" : "Week 4", "value" : "15700" } 
								          ]
								  } );

								        myChart.render("chartContainer");
								},
								failure : function(response, action) {
									App.setAlert('error', '载入失败');
								}
							});
 

					
				}
			}
		});
